package demo1;

import com.sun.org.apache.bcel.internal.generic.FLOAD;

import java.io.File;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: happyiu
 * Date: 2021-11-25
 * Time: 20:13
 */
interface IA{

    public int a =10;

    public abstract  void func();
    //抽象方法
    /*default public void func1(){
        System.out.println("hello!");
        //default修饰的方法 意味着接口默认的方法 不能被重写
    }
    public static void func2(){
        System.out.println("hello!");
        //static定义的方法 也不能被重写 只有IA自己调用的这些方法
    }*/
}

interface IB extends IA{

    public abstract void func5();
}

class hhh{

    public  void func6(){
        System.out.println("测试来了！");
    }
}

class wet implements IB{
    @Override
    public void func() {

    }

    @Override
    public void func5() {

    }
}






class Rect extends hhh implements IA,IB{
    @Override
     public void func() {
        System.out.println("hello!");
    }

    @Override
    public void func5() {

    }
}

class Flower implements  IA{
    @Override
    public void func() {
        System.out.println("world!");
    }
}


public class TestDemo {

    public static void drawMap(IA ia){
        ia.func();
    }

    public static void main(String[] args) {
        Rect rect = new Rect();
        Flower flower = new Flower();
        drawMap(rect);
        drawMap(flower);
    }


    public static void main1(String[] args) {
         IA ia = new Rect();
         ia.func();

    }

}
